
point-swap.o:     file format elf32-littlearm


Disassembly of section .text:

00000000 <swap_w>:




void swap_w( int a, int b )
{  
   0:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
   4:	e28db000 	add	fp, sp, #0
   8:	e24dd014 	sub	sp, sp, #20
   c:	e50b0010 	str	r0, [fp, #-16]
  10:	e50b1014 	str	r1, [fp, #-20]	; 0xffffffec
    int temp; 
	
    temp = a;  
  14:	e51b3010 	ldr	r3, [fp, #-16]
  18:	e50b3008 	str	r3, [fp, #-8]
    a = b;  
  1c:	e51b3014 	ldr	r3, [fp, #-20]	; 0xffffffec
  20:	e50b3010 	str	r3, [fp, #-16]
    b = temp;   
  24:	e51b3008 	ldr	r3, [fp, #-8]
  28:	e50b3014 	str	r3, [fp, #-20]	; 0xffffffec
} 
  2c:	e24bd000 	sub	sp, fp, #0
  30:	e49db004 	pop	{fp}		; (ldr fp, [sp], #4)
  34:	e12fff1e 	bx	lr

00000038 <swap_p>:

void swap_p( int *a, int *b )
{  
  38:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
  3c:	e28db000 	add	fp, sp, #0
  40:	e24dd014 	sub	sp, sp, #20
  44:	e50b0010 	str	r0, [fp, #-16]
  48:	e50b1014 	str	r1, [fp, #-20]	; 0xffffffec
    int *temp; 
	
    temp = NULL;  
  4c:	e3a03000 	mov	r3, #0
  50:	e50b3008 	str	r3, [fp, #-8]
    temp = a;  
  54:	e51b3010 	ldr	r3, [fp, #-16]
  58:	e50b3008 	str	r3, [fp, #-8]
    a = b;  
  5c:	e51b3014 	ldr	r3, [fp, #-20]	; 0xffffffec
  60:	e50b3010 	str	r3, [fp, #-16]
    b = temp;   
  64:	e51b3008 	ldr	r3, [fp, #-8]
  68:	e50b3014 	str	r3, [fp, #-20]	; 0xffffffec
}  
  6c:	e24bd000 	sub	sp, fp, #0
  70:	e49db004 	pop	{fp}		; (ldr fp, [sp], #4)
  74:	e12fff1e 	bx	lr

00000078 <swap_px>:

void swap_px( int *a, int *b )
{  
  78:	e92d4800 	push	{fp, lr}
  7c:	e28db004 	add	fp, sp, #4
  80:	e24dd010 	sub	sp, sp, #16
  84:	e50b0010 	str	r0, [fp, #-16]
  88:	e50b1014 	str	r1, [fp, #-20]	; 0xffffffec
    int *temp; 
	
	printf("swap_px1 %d %d\n", *a, *b);	// 16 32
  8c:	e51b3010 	ldr	r3, [fp, #-16]
  90:	e5931000 	ldr	r1, [r3]
  94:	e51b3014 	ldr	r3, [fp, #-20]	; 0xffffffec
  98:	e5933000 	ldr	r3, [r3]
  9c:	e1a02003 	mov	r2, r3
  a0:	e59f0098 	ldr	r0, [pc, #152]	; 140 <swap_px+0xc8>
  a4:	ebfffffe 	bl	0 <printf>
    *temp = *a;  
  a8:	e51b3010 	ldr	r3, [fp, #-16]
  ac:	e5932000 	ldr	r2, [r3]
  b0:	e51b3008 	ldr	r3, [fp, #-8]
  b4:	e5832000 	str	r2, [r3]
	printf("swap_px2 %d %d %d\n", *a, *b, *temp);	// 16 32 16
  b8:	e51b3010 	ldr	r3, [fp, #-16]
  bc:	e5931000 	ldr	r1, [r3]
  c0:	e51b3014 	ldr	r3, [fp, #-20]	; 0xffffffec
  c4:	e5932000 	ldr	r2, [r3]
  c8:	e51b3008 	ldr	r3, [fp, #-8]
  cc:	e5933000 	ldr	r3, [r3]
  d0:	e59f006c 	ldr	r0, [pc, #108]	; 144 <swap_px+0xcc>
  d4:	ebfffffe 	bl	0 <printf>
    *a = *b;  
  d8:	e51b3014 	ldr	r3, [fp, #-20]	; 0xffffffec
  dc:	e5932000 	ldr	r2, [r3]
  e0:	e51b3010 	ldr	r3, [fp, #-16]
  e4:	e5832000 	str	r2, [r3]
	printf("swap_px3 %d %d %d\n", *a, *b, *temp);	// 32 32 32
  e8:	e51b3010 	ldr	r3, [fp, #-16]
  ec:	e5931000 	ldr	r1, [r3]
  f0:	e51b3014 	ldr	r3, [fp, #-20]	; 0xffffffec
  f4:	e5932000 	ldr	r2, [r3]
  f8:	e51b3008 	ldr	r3, [fp, #-8]
  fc:	e5933000 	ldr	r3, [r3]
 100:	e59f0040 	ldr	r0, [pc, #64]	; 148 <swap_px+0xd0>
 104:	ebfffffe 	bl	0 <printf>
    *b = *temp;   
 108:	e51b3008 	ldr	r3, [fp, #-8]
 10c:	e5932000 	ldr	r2, [r3]
 110:	e51b3014 	ldr	r3, [fp, #-20]	; 0xffffffec
 114:	e5832000 	str	r2, [r3]
	printf("swap_px4 %d %d %d\n", *a, *b, *temp);	// 32 32 32
 118:	e51b3010 	ldr	r3, [fp, #-16]
 11c:	e5931000 	ldr	r1, [r3]
 120:	e51b3014 	ldr	r3, [fp, #-20]	; 0xffffffec
 124:	e5932000 	ldr	r2, [r3]
 128:	e51b3008 	ldr	r3, [fp, #-8]
 12c:	e5933000 	ldr	r3, [r3]
 130:	e59f0014 	ldr	r0, [pc, #20]	; 14c <swap_px+0xd4>
 134:	ebfffffe 	bl	0 <printf>
}  
 138:	e24bd004 	sub	sp, fp, #4
 13c:	e8bd8800 	pop	{fp, pc}
 140:	00000000 	.word	0x00000000
 144:	00000010 	.word	0x00000010
 148:	00000024 	.word	0x00000024
 14c:	00000038 	.word	0x00000038

00000150 <swap_pp>:

void swap_pp( int **a, int **b )
{
 150:	e52db004 	push	{fp}		; (str fp, [sp, #-4]!)
 154:	e28db000 	add	fp, sp, #0
 158:	e24dd014 	sub	sp, sp, #20
 15c:	e50b0010 	str	r0, [fp, #-16]
 160:	e50b1014 	str	r1, [fp, #-20]	; 0xffffffec
    int *tmp = NULL; 
 164:	e3a03000 	mov	r3, #0
 168:	e50b3008 	str	r3, [fp, #-8]
	
    tmp = *a;  
 16c:	e51b3010 	ldr	r3, [fp, #-16]
 170:	e5933000 	ldr	r3, [r3]
 174:	e50b3008 	str	r3, [fp, #-8]
    *a = *b;  
 178:	e51b3014 	ldr	r3, [fp, #-20]	; 0xffffffec
 17c:	e5932000 	ldr	r2, [r3]
 180:	e51b3010 	ldr	r3, [fp, #-16]
 184:	e5832000 	str	r2, [r3]
    *b = tmp;  
 188:	e51b3014 	ldr	r3, [fp, #-20]	; 0xffffffec
 18c:	e51b2008 	ldr	r2, [fp, #-8]
 190:	e5832000 	str	r2, [r3]
}
 194:	e24bd000 	sub	sp, fp, #0
 198:	e49db004 	pop	{fp}		; (ldr fp, [sp], #4)
 19c:	e12fff1e 	bx	lr

000001a0 <test_swap_pp>:

void test_swap_pp()
{
 1a0:	e92d4800 	push	{fp, lr}
 1a4:	e28db004 	add	fp, sp, #4
 1a8:	e24dd010 	sub	sp, sp, #16
	int a,b;  
	int *pa, *pb;

    a = 16;  
 1ac:	e3a03010 	mov	r3, #16
 1b0:	e50b3008 	str	r3, [fp, #-8]
    b = 32;  
 1b4:	e3a03020 	mov	r3, #32
 1b8:	e50b300c 	str	r3, [fp, #-12]

	pa = &a;
 1bc:	e24b3008 	sub	r3, fp, #8
 1c0:	e50b3010 	str	r3, [fp, #-16]
	pb = &b;
 1c4:	e24b300c 	sub	r3, fp, #12
 1c8:	e50b3014 	str	r3, [fp, #-20]	; 0xffffffec

	swap_pp(&pa, &pb); 	
 1cc:	e24b2014 	sub	r2, fp, #20
 1d0:	e24b3010 	sub	r3, fp, #16
 1d4:	e1a01002 	mov	r1, r2
 1d8:	e1a00003 	mov	r0, r3
 1dc:	ebfffffe 	bl	150 <swap_pp>
	printf("%d\n", *pa - *pb);	// 16
 1e0:	e51b3010 	ldr	r3, [fp, #-16]
 1e4:	e5932000 	ldr	r2, [r3]
 1e8:	e51b3014 	ldr	r3, [fp, #-20]	; 0xffffffec
 1ec:	e5933000 	ldr	r3, [r3]
 1f0:	e0633002 	rsb	r3, r3, r2
 1f4:	e1a01003 	mov	r1, r3
 1f8:	e59f0020 	ldr	r0, [pc, #32]	; 220 <test_swap_pp+0x80>
 1fc:	ebfffffe 	bl	0 <printf>
	printf("%d\n", a - b);		// -16
 200:	e51b2008 	ldr	r2, [fp, #-8]
 204:	e51b300c 	ldr	r3, [fp, #-12]
 208:	e0633002 	rsb	r3, r3, r2
 20c:	e1a01003 	mov	r1, r3
 210:	e59f0008 	ldr	r0, [pc, #8]	; 220 <test_swap_pp+0x80>
 214:	ebfffffe 	bl	0 <printf>
}
 218:	e24bd004 	sub	sp, fp, #4
 21c:	e8bd8800 	pop	{fp, pc}
 220:	0000004c 	.word	0x0000004c

00000224 <main>:

int main ( int argc, char **argv )
{  
 224:	e92d4800 	push	{fp, lr}
 228:	e28db004 	add	fp, sp, #4
 22c:	e24dd010 	sub	sp, sp, #16
 230:	e50b0010 	str	r0, [fp, #-16]
 234:	e50b1014 	str	r1, [fp, #-20]	; 0xffffffec
    int a,b;  

    a = 16;  
 238:	e3a03010 	mov	r3, #16
 23c:	e50b3008 	str	r3, [fp, #-8]
    b = 32;  
 240:	e3a03020 	mov	r3, #32
 244:	e50b300c 	str	r3, [fp, #-12]

	swap_w(a, b); 	
 248:	e51b3008 	ldr	r3, [fp, #-8]
 24c:	e51b200c 	ldr	r2, [fp, #-12]
 250:	e1a01002 	mov	r1, r2
 254:	e1a00003 	mov	r0, r3
 258:	ebfffffe 	bl	0 <swap_w>
	printf("%d\n", a - b);	// -16
 25c:	e51b2008 	ldr	r2, [fp, #-8]
 260:	e51b300c 	ldr	r3, [fp, #-12]
 264:	e0633002 	rsb	r3, r3, r2
 268:	e1a01003 	mov	r1, r3
 26c:	e59f008c 	ldr	r0, [pc, #140]	; 300 <main+0xdc>
 270:	ebfffffe 	bl	0 <printf>

	a = 16;  
 274:	e3a03010 	mov	r3, #16
 278:	e50b3008 	str	r3, [fp, #-8]
    b = 32; 
 27c:	e3a03020 	mov	r3, #32
 280:	e50b300c 	str	r3, [fp, #-12]
    swap_p(&a, &b); 	
 284:	e24b200c 	sub	r2, fp, #12
 288:	e24b3008 	sub	r3, fp, #8
 28c:	e1a01002 	mov	r1, r2
 290:	e1a00003 	mov	r0, r3
 294:	ebfffffe 	bl	38 <swap_p>
	printf("%d\n", a - b);	// -16
 298:	e51b2008 	ldr	r2, [fp, #-8]
 29c:	e51b300c 	ldr	r3, [fp, #-12]
 2a0:	e0633002 	rsb	r3, r3, r2
 2a4:	e1a01003 	mov	r1, r3
 2a8:	e59f0050 	ldr	r0, [pc, #80]	; 300 <main+0xdc>
 2ac:	ebfffffe 	bl	0 <printf>

	a = 16;  
 2b0:	e3a03010 	mov	r3, #16
 2b4:	e50b3008 	str	r3, [fp, #-8]
    b = 32; 
 2b8:	e3a03020 	mov	r3, #32
 2bc:	e50b300c 	str	r3, [fp, #-12]
	swap_px(&a, &b); 	
 2c0:	e24b200c 	sub	r2, fp, #12
 2c4:	e24b3008 	sub	r3, fp, #8
 2c8:	e1a01002 	mov	r1, r2
 2cc:	e1a00003 	mov	r0, r3
 2d0:	ebfffffe 	bl	78 <swap_px>
	printf("%d\n", a - b);	// 0
 2d4:	e51b2008 	ldr	r2, [fp, #-8]
 2d8:	e51b300c 	ldr	r3, [fp, #-12]
 2dc:	e0633002 	rsb	r3, r3, r2
 2e0:	e1a01003 	mov	r1, r3
 2e4:	e59f0014 	ldr	r0, [pc, #20]	; 300 <main+0xdc>
 2e8:	ebfffffe 	bl	0 <printf>

	test_swap_pp();
 2ec:	ebfffffe 	bl	1a0 <test_swap_pp>
	

    return 0;  
 2f0:	e3a03000 	mov	r3, #0
}
 2f4:	e1a00003 	mov	r0, r3
 2f8:	e24bd004 	sub	sp, fp, #4
 2fc:	e8bd8800 	pop	{fp, pc}
 300:	0000004c 	.word	0x0000004c
